package com.easyweb.generator.model;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 分页查询结果VO
 * @param <E> 
 * @author fukun
 * version 1.0
 * 
 */ 
public class PageResult<E> implements Serializable {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = -5685661185763405756L;

	/**
	 * 查询分页VO
	 */
	private Page page;
	
	/**
	 * 查询分页数据结果
	 */
	private List<E> result;

	/**
	 */
	public PageResult() {
		super();
	}
	
	/**
	 * @param page 
	 * @param result 
	 */
	public PageResult(Page page, List<E> result) {
		super();
		this.page = page;
		this.result = result;
	}
	
	public Page getPage() {
		return page;
	}

	public void setPage(Page page) {
		this.page = page;
	}

	/**
	 * @return List<E>
	 */
	public List<E> getResult() {
		if (null == result) {
			result = new ArrayList<E>();
		}
		return result;
	}

	public void setResult(List<E> result) {
		this.result = result;
	}

	@Override
	public String toString() {
		return "PageResultVO [page=" + page + ", result=" + getResult() + "]";
	}
}
